package com.dzbiao.controller;

import com.dzbiao.entity.Product;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/product")
public class PorductController {


    @GetMapping("/{id}")
    public String detail(@PathVariable("id") Integer id,String info){
        System.out.println("info:" + info);
        return new Product(1,"xxxx商品" + id ,2 , 100.0).toString();
    }

}
